package gui.win.para;

import gui.Segl1;
import gui.utils.Borders;
import gui.utils.Para;
import gui.utils.Slider;
import gui.utils.SliderWrap;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.text.DecimalFormat;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class Predator extends JFrame{
    public Predator(Segl1 Seg_L1){
        super();
        this.setLocation(Seg_L1.getLocationOnScreen().x + 50, Seg_L1.getLocationOnScreen().y + 50);
        this.setLayout(new FlowLayout());
        this.setSize(new Dimension(400, 170));
        JPanel p = new JPanel();
        p.setBorder(Borders.getTitledBorder(Borders.STANDARD_TITLED_BORDER, "PREDATOR"));
        p.setLayout(new BorderLayout());

        JPanel p1 = new JPanel();
        p1.setLayout(new BorderLayout());
        p1.add(new SliderWrap(Slider.PREDHPSPLUSM, 9999, 1, Para.PREDHPSPLUSM, "HPS+ Error Rate (Mismatch)", 166, 5, null, true, 10000, new Color(0, 0, 0), new DecimalFormat("#0.0000")), BorderLayout.NORTH);
        p1.add(new SliderWrap(Slider.PREDHPSMINM, 9999, 1, Para.PREDHPSMINM, "HPS- Error Rate (Mismatch)", 166, 5, null, true, 10000, new Color(0, 0, 0), new DecimalFormat("#0.0000")), BorderLayout.CENTER);
        p1.add(new SliderWrap(Slider.PREDHPSLEN, 10, 0, Para.PREDHPSLEN, "HPS Run Length", 250, 3), BorderLayout.SOUTH);
        p.add(p1, BorderLayout.NORTH);

        this.add(p, BorderLayout.CENTER);
        this.add(new Buttons(this), BorderLayout.SOUTH);
        this.setVisible(true);
        this.setAlwaysOnTop(true);
    }
    public void closeFrame(){this.dispose();}
}
